#include <func.h>

int main()
{
    int num = 1234;
    int netNum = htonl(num);
    printf("num:%d, netNum: %d\n", num, netNum);
    printf("num:%08x, netNum: %08x\n", num, netNum);


    int port = 8080;
    int netPort = htons(port);
    printf("port:%04x\n", port);
    printf("netport:%04x\n", netPort);

    int hport = ntohs(netPort);
    printf("hport:%d\n", hport);


    return 0;
}

